
/**
 *
 * @author group_0217
 */
public class Link extends Data {
    // The link of the files. Just keep the path of the file, once the file is moved or deleted,
    // the link cannot find the file anymore.

    // The path of the linked File.
    private String path;

    /**
     * Create a Link.
     * @param path the path of the File to be linked.
     * @param name the name of the Link.
     */
    public Link(String path, String name) {
        super(name);
        this.path = path;
    }

    @Override
    public Data copy() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void list() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String grep(String regex) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    /**
     * Return the linked path.
     */
    public String getLn() {
        // Get the path.
        return this.path;
    }
}
